Products:
PrintOMatic MX, PrintOMatic Xtra 1.6.5
Platforms:
all
Before you can customize the printing dialogs, you must be using document objects instead of the simple "print" commands to do your printing.
You create a document object by "creating an instance" of the PrintOMatic Xtra, and then manipulating the document object before you finally print its contents. A basic printing framework that uses a document object to print (with the normal dialogs) looks like this:
set doc = new (xtra "printomatic")
if not objectp(doc) then exit
append doc, member "blah"
if doJobSetup(doc) = TRUE then print doc
set doc = 0
You must display the page setup dialog box before you add anything to your document. Once you start addding items to your document object, the page layout cannot be changed. Display the page setup dialog by adding a new line to the basic script:
set doc = new (xtra "printomatic")
if not objectp(doc) then exit
if doPageSetup(doc) = FALSE then exit
append doc, member "blah"
if doJobSetup(doc) = TRUE then print doc
set doc = 0
The "if" statement bracketing the doPageSetup
command cancels the print job if the user clicks the "Cancel" button.
ItÆs easy to hide the job setup dialog box from your users. Simply donÆt call doJobSetup()
before calling print
:
set doc = new (xtra "printomatic")
if not objectp(doc) then exit
append doc, member "blah"
print doc
set doc = 0
To hide the print progress dialog, use the setProgressLoc()
command to position it off the screen using negative coordinates:
set doc = new (xtra "printomatic")
if not objectp(doc) then exit
append doc, member "blah"
setProgressLoc doc, Point(-1000,-1000)
if doJobSetup(doc) = TRUE then print doc
set doc = 0
The setProgressLoc
command is only available when you register your copy of the Xtra.
You cam place your own custom bitmap into the Print Progress Dialog. Simply use the setProgressPict()
command to specify a bitmap cast member you would like to use:
set doc = new (xtra "printomatic")
if not objectp(doc) then exit
append doc, member "blah"
setProgressPict doc, member "myprogresspict"
if doJobSetup(doc) = TRUE then print doc
set doc = 0
The setProgessPict
command is only available when you register your copy of the Xtra.